<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>老师信息</title>
    <style>
        body {
            width: 920px;
            margin: 0 auto;
        }
        .teacher {
            clear: both;
        }
        .photo {
            margin-top: 20px;
            width: 140px;
            height: 140px;
            border-radius: 70px 70px 70px 70px;
            overflow: hidden;
            float: left;
        }
        .content {
            margin-left: 60px;
            width: 580px;
            float: left;
        }
        .keyinfo {
            font: bold 18px Arial;
        }
    </style>
</head>
<body>
    <h2>{{ subject.name }}学科老师信息</h2>
    <hr>
    {% for teacher in teachers %}
    <div class="teacher">
        <div class="photo">
            <img src="{% static teacher.photo %}" width="140">
        </div>
        <div class="content">
            <p class="keyinfo">
                {{ teacher.name }}&nbsp;&nbsp;
                {{ teacher.sex | yesno:"男, 女" }}&nbsp;&nbsp;
                {{ teacher.birth }}
            </p>
            <p>
                {{ teacher.intro }}
            </p>
            <p>
                <a href="/good/?tno={{ teacher.no }}&sno={{ subject.no }}">好评</a>（<span>{{ teacher.good_count }}</span>）&nbsp;&nbsp;
                <a href="/bad/?tno={{ teacher.no }}&sno={{ subject.no }}">差评</a>（<span>{{ teacher.bad_count }}</span>）
            </p>
        </div>
    </div>
    {% endfor %}
</body>
</html>